Optimal. Leaf size=125 \[ \frac{(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-1} (g \cos (e+f x))^{-m-n}}{f g (m-n+2)}+\frac{(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^n (g \cos (e+f x))^{-m-n}}{c f g (m-n) (m-n+2)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.410686, antiderivative size = 125, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 45, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.044, Rules used = {2849, 2848} \[ \frac{(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-1} (g \cos (e+f x))^{-m-n}}{f g (m-n+2)}+\frac{(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^n (g \cos (e+f x))^{-m-n}}{c f g (m-n) (m-n+2)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2849
Rule 2848
Rubi steps
\begin{align*} \int (g \cos (e+f x))^{-1-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+n} \, dx &=\frac{(g \cos (e+f x))^{-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+n}}{f g (2+m-n)}+\frac{\int (g \cos (e+f x))^{-1-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n \, dx}{c (2+m-n)}\\ &=\frac{(g \cos (e+f x))^{-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+n}}{f g (2+m-n)}+\frac{(g \cos (e+f x))^{-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n}{c f g (m-n) (2+m-n)}\\ \end{align*}
Mathematica [A] time = 26.008, size = 132, normalized size = 1.06 \[ -\frac{2^{n-1} \cos ^{2 (n-1)}\left (\frac{1}{4} (2 e+2 f x+\pi )\right ) (a (\sin (e+f x)+1))^m (c-c \sin (e+f x))^{n-1} (\sin (e+f x)-m+n-1) \left (\cos \left (\frac{1}{2} (e+f x)\right )-\sin \left (\frac{1}{2} (e+f x)\right )\right )^{2-2 n} (g \cos (e+f x))^{-m-n}}{f g (m-n) (m-n+2)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.53, size = 0, normalized size = 0. \begin{align*} \int \left ( g\cos \left ( fx+e \right ) \right ) ^{-1-m-n} \left ( a+a\sin \left ( fx+e \right ) \right ) ^{m} \left ( c-c\sin \left ( fx+e \right ) \right ) ^{-1+n}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.84344, size = 324, normalized size = 2.59 \begin{align*} \frac{{\left ({\left (m - n + 1\right )} \cos \left (f x + e\right ) - \cos \left (f x + e\right ) \sin \left (f x + e\right )\right )} \left (g \cos \left (f x + e\right )\right )^{-m - n - 1}{\left (a \sin \left (f x + e\right ) + a\right )}^{m} e^{\left (2 \,{\left (n - 1\right )} \log \left (g \cos \left (f x + e\right )\right ) -{\left (n - 1\right )} \log \left (a \sin \left (f x + e\right ) + a\right ) +{\left (n - 1\right )} \log \left (\frac{a c}{g^{2}}\right )\right )}}{f m^{2} + f n^{2} + 2 \, f m - 2 \,{\left (f m + f\right )} n} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (g \cos \left (f x + e\right )\right )^{-m - n - 1}{\left (a \sin \left (f x + e\right ) + a\right )}^{m}{\left (-c \sin \left (f x + e\right ) + c\right )}^{n - 1}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]